home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / ACL / Animation Class Library / Headers / AnimCObject.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-01  |  2.1 KB  |  97 lines  |  [TEXT/MPCC]

  1.  
  2. /********************************************
  3.  **** Animation Class Library V1.0 © 1994 Yves Schmid & Alia Development
  4.  ****
  5.  **** AnimCObject.h
  6.  ****
  7.  **** Created:      28 May 1994
  8.  **** Modified:     01 Septembre 1994
  9.  **** Version:      0
  10.  **** Compatible:   C++, Mac System 7
  11.  ****
  12.  **** Description:    Animation objects which handle controls.
  13.  ****
  14.  ****                AnimCObject is a child class of the "AnimObject" class.
  15.  ****
  16.  *******************/
  17.  
  18. #ifndef AnimCObject_H
  19. #define AnimCObject_H
  20.  
  21.  
  22. #include "CoreHead.h"
  23. #include "AnimControl.h"
  24. #include "AnimObject.h"
  25.  
  26.  
  27. class AnimBase;
  28.  
  29. class AnimCObject: public AnimObject
  30. {
  31.  
  32.     //***********************************************************
  33.     //.............. P U B L I C   M E T H O D S.................
  34.  
  35.     public:
  36.  
  37.     AnimCObject(AnimSupervisor *base);
  38.     ~AnimCObject(void);
  39.  
  40.     
  41.     
  42.     virtual void runcontrol(AnimControl *control);    // Installs a new control, the previous
  43.                                                    // control is removed
  44.                                                 
  45.     virtual void stopcontrol(void);        // Removes immediatly the current control
  46.     
  47.     inline AnimControl *getcurrentcontrol(void) {return control;}    // Returns the current
  48.                                                                    // control or NULL                                    
  49.  
  50.  
  51.  
  52.     //***********************************************************
  53.  
  54.     protected:
  55.  
  56.     virtual void processcontrols(void);
  57.     
  58.  
  59.     virtual void initonecontrol(AnimControl *);            // Called at the start of
  60.                                                         // a new control
  61.                                                                     
  62.     virtual Boolean processonecontrol(AnimControl *);    // Process a control, override this
  63.                                                         // method to process new
  64.                                                         // commands
  65.  
  66.  
  67.     private:
  68.     
  69.     AnimControl    *control;                
  70.     Boolean        controlrunning;            
  71.     float        controlspeed;            
  72.     long        controlwait;            
  73.  
  74.     float        sign_x,sign_y;            
  75.     float        slope,x,y;
  76.     float        x1,x2,y1,y2,f;
  77.     Boolean        checkangle45;
  78.  
  79.     float        curveloop;                
  80.     float        Qx,Qy,Px,Py,Rx,Ry,cx,cy;
  81.     float        curvespeed;
  82.     Boolean        dostartgoto;
  83.  
  84.     void    startgoto(float ax1, float ay1, float ax2, float ay2);
  85.     Boolean processgoto(float sx, float sy);
  86.  
  87.     void    startcurve(float ax1, float ay1, float ax2, float ay2, float mx, float my);
  88.     Boolean processcurve(float sx, float sy);
  89.     Boolean    processcurvegoto(float sx, float sy);
  90.     
  91. };
  92.  
  93.  
  94.  
  95. #endif
  96.  
  97.